import React, { Component } from 'react'
import { withRouter } from 'react-router-dom'

import './nav.css'


class index extends Component {
    render() {
        return <div className="nav">
            <div className="logo"></div>
            <div>
                <div className="nav_items">
                    <div onClick={() => {
                        this.props.history.replace('/')
                    }}>
                        <span>首页</span>
                        <div className={"navUnderline " + (this.props.history.location.pathname == '/' ? 'navUnderlineAc' : '')}></div>
                    </div>
                    <div onClick={() => {
                        this.props.history.replace('/about')
                    }}>
                        <span>关于我们</span>
                        <div className={"navUnderline " + (this.props.history.location.pathname == '/about' ? 'navUnderlineAc' : '')}></div>
                    </div>
                    <div onClick={() => {
                        this.props.history.replace('/map')
                    }}>
                        <span>联系我们</span>
                        <div className={"navUnderline " + (this.props.history.location.pathname == '/map' ? 'navUnderlineAc' : '')}></div>
                    </div>
                    <div onClick={() => { window.open("http://hd.20app.vip") }}>
                        <span>20云选秀</span>
                        <div className="navUnderline"></div>
                    </div>
                </div>
            </div>
        </div>
    }
}

export default withRouter(index)
